package org.ym.system.domain.model.entity;

import com.google.common.base.Preconditions;
import lombok.*;
import org.ym.database.hibernate.base.BaseModel;
import org.ym.system.domain.command.SysUserCommand;

import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * //todo
 * @author ym
 */
@Entity
@Table(name = "sys_user")
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@Builder
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SysUser extends BaseModel {
    private static final long serialVersionUID = 2798690491320989248L;


    /**
     * 转换
     * @param command 创建命令
     * @return fileRule
     */
    public static SysUser of(SysUserCommand command){
        Preconditions.checkNotNull(command);
        return SysUser.builder()
                //todo
                .build();
    }

    /**
     * 更新
     * @param command 更新命令
     */
    public void mutate(SysUserCommand command){
        Preconditions.checkNotNull(command);
        //todo
    }
}
